<!-- 
  /
 -->

<template>
  <div>
    <h1>Index</h1>

    <!-- 路由导航
      RouterLink    => NuxtLink
    -->

    <NuxtLink to="/about">go About</NuxtLink>

    <button @click="onJump">点我</button>
  </div>
</template>

<script lang="ts" setup>
const router = useRouter();

function onJump() {
  // 1. router.push()
  // router.push("/about");
  // 2. navigateTo()
  navigateTo("/about");
}
</script>
